package com.huawei.esdk.uc.interceptor;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;

import com.huawei.esdk.platform.common.utils.ApplicationContextUtil;
import com.huawei.esdk.uc.flowcontrol.flowout.UCFlowOutPerformer;

public class UCOBGInInterceptor extends AbstractPhaseInterceptor<Message>
{
    public UCOBGInInterceptor()
    {
        super(Phase.POST_PROTOCOL);
    }
    
    @Override
    public void handleMessage(Message message)
        throws Fault
    {
        UCFlowOutPerformer performer = ApplicationContextUtil.getBean("southFCPerformer");
        if (performer != null)
        {
            performer.sempRefill();
        }
    }
}
